﻿
@{
    ViewData["Title"] = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<nav aria-label="breadcrumb">
    <ol class="breadcrumb">
        <li class="breadcrumb-item active" aria-current="page">Application</li>
    </ol>
</nav>

<button type="button" class="btn btn-danger btn-restart">ReStart</button>

<div class="text-center loading-restart" style="display:none">
    <div class="spinner-border" role="status">
        <span class="sr-only">Loading...</span>
    </div>
</div>

@section Scripts{

    <script>

        $('.btn-restart').on('click', function () {

            $.post("/Application/ReStart", {}, function (res) {
                if (res.code == 1) {
                    location.href = '/Projects/'
                }
            });
            $(this).hide();
            $('.loading-restart').show();
        })

    </script>

}